import { defineStore } from 'pinia'
import { reactive } from "vue";
export const useStore = defineStore('screenRecording', () => {
  // 录屏数据
  const events = reactive({
    order: [],
  } as any)
  // 添加录屏数据
  const addEvents = (val: any[], key: string) => {
    events[key] = val;
  }
  // 重置录屏数据
  const initEvents = (key:string) => {
    events[key].splice(0, events[key].length);
  }
  return {
    events,
    addEvents,
    initEvents,
  }
})